<div class="page-wrapper d-flex flex-column pt-4">
    <div class="container-xl">
        <div class="page-header d-print-none">
            <div class="row align-items-center">
                <div class="col">
                    <div class="page-pretitle">
                        Create
                    </div>
                    <h3 class="page-title">
                        New Theme
                    </h3>
                </div>
            </div>
        </div>
    </div>
    <div class="page-body d-flex flex-row-reverse">

        <aside class="bd-sidebar sub-sidebar">
            <nav class="bd-links p-3" aria-label="Sub-section navigation">
                <div class="card card-body">
                    <!-- <actions preview-url="viewmodel.detailsUrl" back-url="'/portal/theme/list'"></actions> -->
                    <div class="mb-3">
                        <statuses status="viewmodel.status"></statuses>
                    </div>
                    <div class="btn-group w-100 mb-3" role="group">
                        <button id="btnToSubmit" type="button" ng-click="save()" class="btn btn-primary text-white">
                            <i class="fa fa-save"></i>
                            <span ng-bind="translate('Save')"></span>
                        </button>
                    </div>
                    <custom-image header="'Theme Image'" type="'Themes'" folder="viewmodel.name"
                        src-url="viewmodel.imageUrl" src="viewmodel.image" auto="'true'"></custom-image>
                </div>
            </nav>
        </aside>

        <!-- ----------------------------------------------------------- -->

        <div class="content-body py-3 pe-3">
            <!-- Main content -->
            <section class="" ng-init="getSingle()">

                <div class="card">
                    <div class="card-body">
                        <form id="frm-theme" ng-class="{'submitted': submitted}" ng-submit="save()" ng-if="viewmodel">
                            <div asp-validation-summary="ModelOnly" class="text-danger"></div>
                            <div class="mb-3">
                                <label class="form-label">Theme title</label><br />
                                <input type="text" ng-model="viewmodel.title" ng-change="generateSEO()"
                                    class="form-control form-control-lg" placeholder="Enter your theme name here..." />
                            </div>

                            <div class="mb-3">
                                <label class="form-label">Preview URL</label><br />
                                <input type="text" ng-model="viewmodel.previewUrl" class="form-control"
                                    placeholder="Preview Url" />
                            </div>
                            <div class="row">
                                <div class="col">
                                    <div class="mb-3">
                                        <label class="form-label">Asset</label>
                                        <api-file form-name="'assets'" class="custom-file" posted-file="asset">
                                        </api-file>
                                    </div>
                                </div>
                                <div class="col">
                                    <div class="mb-3">
                                        <label class="form-label">Import Theme</label><br />
                                        {{theme.name}}
                                        <api-file form-name="'theme'" class="custom-file" posted-file="theme">
                                        </api-file>
                                    </div>
                                </div>
                            </div>
                            <hr />
                            <div class="">
                                <div class="form-check form-switch" ng-show="!theme">
                                    <input type="checkbox" class="form-check-input"
                                        ng-model="viewmodel.isCloneFromCurrentTheme" id="isCloneFromCurrentTheme" />
                                    <label class="custom-control-label" for="isCloneFromCurrentTheme">Clone Template
                                        from
                                        current theme!</label>
                                </div>
                                <div class="form-check form-switch">
                                    <input type="checkbox" class="form-check-input" ng-model="viewmodel.isActived"
                                        id="isActived" />
                                    <label class="custom-control-label" for="isActived">Activate this theme for your
                                        site!</label>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </section>
            <!-- /.content -->
        </div>
    </div>
</div>